package com.yusheng.tr.common.core.openfeign.base;



import com.yusheng.tr.common.core.entity.system.SysUser;
import com.yusheng.tr.common.core.openfeign.factory.SysUserFeignServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @ClassName jiang_jun_qin
 * @date 2023/4/11 12:56
 * @Version 1.0
 */
@FeignClient(value = "school-system",contextId = "sysUserFeign",fallbackFactory = SysUserFeignServiceFallback.class)
public interface ISysUserFeignService {

    @PostMapping(value = "/inner/user/by/name",consumes  = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
    SysUser selectUserByUserName(@RequestParam("username") String username);

    @PostMapping(value = "/inner/update/user/profile",consumes=MediaType.APPLICATION_JSON_VALUE)
    void updateUserProfile(@RequestBody SysUser sysUser);
}
